/*
 * CAppStateCreateGame.h
 *
 *  Created on: 24/12/2012
 *      Author: Dalton
 */

#ifndef CAPPSTATEPLAYGAME_H_
#define CAPPSTATECPLAYGAME_H_

#define MAX_NICK_LENGHT 30
#define MAX_IP_LENGHT 15

#include <string>
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include "CAppState.h"
#include "SurfaceWrapper.h"
using namespace std;

enum config{
	NICK, IP
};

class CAppStatePlayGame : public CAppState{
	private:
		static CAppStatePlayGame instance;
		int conf;
		SDL_Surface* surface;
		SDL_Surface* bar;
		string nickWrapper;
		string ipWrapper;
		string oldNick;
		SDL_Surface* userIp;
		SDL_Color color;
		SDL_Surface* userNick;
		TTF_Font* font;
    private:
		CAppStatePlayGame();

		void onKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode);

		void onLButtonDown(int mX, int mY);

    public:
        void onActivate();

        void onDeactivate();

        void onLoop();

        void onRender(SDL_Surface* surf_Display);

    public:
        static CAppStatePlayGame* getInstance();

};




#endif /* CAPPSTATEPLAYGAME_H_ */
